#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
void Yanghui(int arr[4][4], int n)
{
	int i = 0;
	int j = 0;
	for (i = 0; i < n; i++)
	{
		for (j = 0; j <= i; j++)
		{
			if (i == j || j==0)
			{
				arr[i][j] = 1;
			}
			else
			{
				arr[i][j] = arr[i - 1][j] + arr[i - 1][j - 1];
			}
		}
	}
}
void print(int arr[4][4], int n)
{
	int i = 0;
	for (i = 0; i < n; i++)
	{
		int j = 0;
 		for (j = 0; j <= i; j++)
		{
			printf("%d ", arr[i][j]);
		}
		printf("\n");
	}
}
int main()
{
 	int arr[10][10] = { 0 };
	Yanghui(arr, 10);
	print(arr, 10);
}